/*
 * @Author: 
 * @Date: 2021-04-28 15:48:43
 * @LastEditTime: 2021-04-28 16:15:59
 * @LastEditors: Please set LastEditors
 * @Description: 
 */
import config from "@/config/index.js"
const { cesiumToken } = config;

class myCesium {
    constructor(id) {
        this.id = id; //元素盒子id
        this.viewer = null; //初始化的cesium对象
    }

    /**
     * @description: 初始化cesium
     * @param {*}
     * @return {*} viewer 返回初始化的cesium对象
     */
    init() {
        Cesium.Ion.defaultAccessToken = cesiumToken;
        this.viewer = new Cesium.Viewer(this.id);

        
        //去除版权信息
        this.viewer._cesiumWidget._creditContainer.style.display = "none";

        return this.viewer;
    }
}





export default myCesium;